package com.gaoyi.crm.db.entity;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.room.Entity;

import com.gaoyi.crm.db.CrmDatabase;

@Entity(tableName = CrmDatabase.TABLE_PMN_ATTACH)
public class PmnAttach extends BaseEntity implements Parcelable {
    private String pmnId;
    private String attach;
    private String aattach;
    private String uploadPath; // 上传成功后的服务器地址名称，避免重复上传文件
    private int OrderId;

    public PmnAttach() {
    }

    protected PmnAttach(Parcel in) {
        pmnId = in.readString();
        attach = in.readString();
        aattach = in.readString();
        uploadPath = in.readString();
        OrderId = in.readInt();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(pmnId);
        dest.writeString(attach);
        dest.writeString(aattach);
        dest.writeString(uploadPath);
        dest.writeInt(OrderId);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<PmnAttach> CREATOR = new Creator<PmnAttach>() {
        @Override
        public PmnAttach createFromParcel(Parcel in) {
            return new PmnAttach(in);
        }

        @Override
        public PmnAttach[] newArray(int size) {
            return new PmnAttach[size];
        }
    };

    public String getUploadPath() {
        return uploadPath;
    }

    public void setUploadPath(String uploadPath) {
        this.uploadPath = uploadPath;
    }

    public String getPmnId() {
        return pmnId;
    }

    public void setPmnId(String pmnId) {
        this.pmnId = pmnId;
    }

    public String getAttach() {
        return attach;
    }

    public void setAttach(String attach) {
        this.attach = attach;
    }

    public String getAattach() {
        return aattach;
    }

    public void setAattach(String aattach) {
        this.aattach = aattach;
    }

    public int getOrderId() {
        return OrderId;
    }

    public void setOrderId(int orderId) {
        OrderId = orderId;
    }
}
